<?php
/**
 * @package			ALM ProductControl
 * @version			$Id:$
 * @subpackage		com_almapc
 * @autor			ALM Studio
 * @copyright		Copyrights ALM Studio 2011. All rights reserved
 * @autor url		http://alm-studio.net
 * @autor email		info@almstudio.net
 */
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$listOrder	= $this->escape($this->state->get('list.ordering'));
$listDirn	= $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_almpc&view=types'); ?>" method="post" name="adminForm">
	<fieldset id="filter-bar">	
		<div class="filter-search fltlft">
			<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('COM_ALMPC_FILTER_SEARCH'); ?></label>
			<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" title="<?php echo JText::_('COM_ALMPC_FILTER_TEXT'); ?>" />
			<button type="submit"><?php echo JText::_('COM_ALMPC_SEARCH_BUTTON'); ?></button>
			<button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('COM_ALMPC_SEARCH_RESET'); ?></button>
		</div>
	</fieldset>
<div class="clr"></div>
<table class="adminlist">
	<thead>
		<tr>
			<th width="5">
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_ID', 'TypeId', $listDirn, $listOrder); ?>
			</th>
			<th width="10">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_TYPE_NAME', 'TypeName', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMPC_TYPE_STATUS', 'TypeStatus', $listDirn, $listOrder); ?>
			</th>			
		</tr>
	</thead>
	<tfoot>	
		<tr>
			<td colspan="4">
				<?php echo $this->pagination->getListFooter(); ?></td>
		</tr>		
	</tfoot>
	<tbody>
		<?php foreach($this->items as $i => $item): 
?>
		<tr class="row<?php echo $i % 2; ?>">
			<td>
				<?php echo $item->TypeId; ?>
			</td>
			<td>
				<?php echo JHtml::_('grid.id', $i, $item->TypeId); ?>
			</td>
			<td>
			<a href="<?php echo JRoute::_('index.php?option=com_almapc&task=type.edit&TypeId=' . $item->TypeId); ?>">
				<strong><?php echo $item->TypeName; ?></strong>
				</a>
			</td>
			<td>
				<?php echo $item->TypeStatus; ?>
			</td>
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
